Open a phone charger, a radio or a laptop and you find the same few parts over and over: tiny black boxes with three legs, small glass beads with two, and one chip with a hundred. Everything the machine does, from playing a song to deciding that a screen should light up, is done by those parts.
There are really only three ideas. A part that lets current through in one direction only. A part where a small voltage on one leg controls a large current between the other two. And a trick, feedback, for making the second kind behave. Learn these and you can read the inside of nearly any device. They are also the bottom layer of everything in Computer Architecture (34/25).
Who takes it: electrical and computer engineers, usually in year 3, often as a pair of courses (devices, then circuits).
What it's for: designing circuits that make something happen: switch a load, amplify a signal, convert power, hold a voltage steady.
Comes after: Circuit Analysis (34/34).
Leads to: Digital Logic Design (34/36) and Embedded Systems (34/41), where the transistors are hidden behind gates and code; Communication Systems (34/40), whose radios are amplifiers and filters; and Power Systems & Electric Machines (34/39), where the inverters that connect solar panels to the grid are transistor switches.
Honest line: you won't be able to lay out a circuit board after this. You will see why a diode needs a resistor, why an amplifier's gain is set by two resistors rather than by the chip, and why a faster processor runs hotter.
Pure silicon barely conducts: its electrons are locked into bonds. Add a sprinkle of phosphorus and each atom donates a spare electron: you get n-type silicon, with mobile negative charge. Add boron and each atom is one electron short, leaving a hole that behaves like a mobile positive charge: p-type. Neither is interesting. Join them and something happens at the seam.
Electrons wander across into the p side, holes into the n side, and they cancel. What is left near the seam are fixed charged atoms that set up an electric field, which pushes back. The result is an empty zone with a built-in voltage of roughly 0.6 to 0.7 V in silicon. Push the p side positive (forward bias) and the zone shrinks and the carriers pour through; push it the other way (reverse bias) and the zone widens and almost nothing flows. That is the diode: a one-way valve with a rule that every graduate recites.
Exponential means a tiny voltage change is a huge current change. Each extra 60 mV multiplies the current by ten, which is why a silicon diode always seems to sit at "about 0.6 to 0.7 V" whether it carries a milliamp or a hundred. That is also why you never connect a diode straight across a battery. Put an LED, which needs about 2 V, on a 5 V supply and you choose the current with a resistor: (5 − 2) V ÷ 10 mA = 300 Ω.
An LED is a junction in which falling electrons give off light, at the energy of the material's gap. Silicon is a poor light emitter, so LEDs use other compounds; efficient blue ones, which made white LED lighting possible, took until the early 1990s and earned the 2014 Nobel Prize in Physics (Akasaki, Amano and Nakamura). See Screens (29/10) for what they do next.
The commonest job of a diode is rectifying. A diode (or four, in a bridge) turns the alternating mains into bumps of one polarity. A big capacitor smooths the bumps: it charges at each peak and feeds the load between peaks. The sag between peaks is the ripple, roughly I ÷ (2 f C) for a bridge. A 100 mA load on a 1 mF capacitor at 50 Hz gives about 1 V of ripple.
Ideal Shockley model with a silicon-like saturation current; real diodes also have series resistance and break down in reverse. Heat the diode and it conducts at lower voltage.
A 12 V rms transformer secondary (17 V peak), silicon diodes with a 0.7 V drop each, a constant-current load. Computed step by step, not from the formula.
Now the idea that changed the century. A transistor has three terminals, and a voltage or current on one controls a large current between the other two. Bell Labs demonstrated the first working one in December 1947 (Bardeen, Brattain and Shockley; the 1956 Nobel Prize in Physics). The version inside every chip is the MOSFET: a metal gate, a thin glass insulator and the silicon underneath.
Picture a tap with no handle but an electric field. Put a positive voltage on the gate and it pulls electrons to the surface beneath it, forming a conducting channel between the other two terminals, called source and drain. Below a threshold voltage nothing flows: the switch is open. Above it the switch closes, and the more the gate exceeds the threshold the lower the channel's resistance. Because the gate sits on an insulator it draws no steady current at all. A signal can control a thousand such switches without being loaded down.
Add a resistor from the drain up to the supply and you have the simplest logic gate. Gate low: the transistor is off, no current flows through the resistor, and the output sits at the supply, a logic 1. Gate high: the transistor conducts, pulls the output toward 0 V, and the output is a logic 0. High in, low out: an inverter. Notice the output is clean at both ends and wobbly only in the middle, where the input is near the threshold. Digital design is the art of never living in the middle, and that is why noise in a digital circuit does not accumulate: each stage restores the level.
Supply 5 V, threshold 1 V, k = 2 mA/V². A textbook square-law model; real short-channel transistors depart from it, but the shape is the same.
The same part can be used in between on and off, as a variable tap. This is how weak signals from a microphone, an antenna or a heart sensor get strong enough to use. Take the older bipolar transistor (BJT): its collector current depends on the voltage across its base and emitter exactly as the diode's does, exponentially. A graduate remembers one number from that, the transconductance:
At 1 mA the transconductance is 38.7 mS, and with a 4.7 kΩ resistor the voltage gain is −182. A 5 mV wiggle at the input becomes about 0.9 V at the output. The idea behind this is calculus: near its resting point (the bias or Q-point) the exponential curve looks like its tangent line, and a straight line is an amplifier. Move far from that point and the curve bends: output peaks get squashed, which is distortion, and when they hit the supply they flatten, which is clipping. Choosing the bias so the output rests mid-way between the rails, leaving room to swing both ways, is most of the practical art.
Supply 12 V, exponential BJT model at 300 K, output limited to between 0.2 V and the supply. Dashed grey is what a perfectly straight-line amplifier would give.
A single transistor stage has a gain that wanders with temperature, with the individual part and with the supply. Engineers do not fight that. They pile on enormous gain, then use feedback to throw most of it away in a controlled way. An operational amplifier is a block of a dozen transistors with two inputs and one output whose gain is huge (100,000 or more) and utterly unreliable. Wrapped with two resistors it becomes a precision amplifier.
Two approximations make op-amp circuits almost mental arithmetic. Horowitz and Hill call them the golden rules: (1) with feedback, the output does whatever it must to make the two inputs equal; (2) the inputs draw no current. Take an inverting amplifier with an input resistor Rin and a feedback resistor Rf. The "+" input is at 0 V, so the "−" input is held at 0 V too, a virtual ground. The input current is Vin ÷ Rin and, since none enters the op-amp, it all goes through Rf:
The gain is set by two resistors, which are cheap and stable, and the op-amp's own huge gain drops out. The price is bandwidth: an op-amp's gain falls as frequency rises, and the product of gain and bandwidth stays roughly constant. A part with a gain-bandwidth product of 1 MHz can give a gain of 10 up to about 100 kHz, or a gain of 100 up to about 10 kHz. This is exactly the loop-gain argument of Control Systems (34/20), written in resistors.
Single-pole op-amp model with a gain-bandwidth product of 1 MHz. Drag the open-loop gain down to 100 to see where the golden rule stops being true.
Every resistor, even one carrying no current, has a tiny random voltage across it. Electrons jiggle with heat, and the jiggle adds up to noise. John Johnson measured it at Bell Labs and Harry Nyquist explained it, both in 1928. The result is a number you can compute, and it is the same for every material of that resistance:
A 10 kΩ resistor at room temperature observed over 20 kHz, the audio range, has about 1.8 µV of noise. That is far below anything you would hear, but a microphone, a radio front end or a heart monitor deals in microvolts, and there the noise is the whole story. The practical consequences are all in the formula: listen over less bandwidth (filter), use lower resistances where the signal allows, and, if you must, cool the thing. Independent noise sources add in power, not in amplitude, so two equal noise sources give only about 41% more voltage, not double. That is the same square-root rule you met in Probability & Statistics (34/05).
The noise trace uses a fixed random sequence scaled to the computed rms, so you see the same wiggles grow and shrink. Only thermal noise is modelled; real circuits add shot and amplifier noise on top.
Now pair two MOSFETs, one that conducts when its gate is high (n-type) and one that conducts when it is low (p-type), with their drains joined. For either input, exactly one is on and the other is off: the output is pulled firmly to the supply or to ground, and no steady current flows. That is CMOS, the logic family of every processor, and its great virtue is that a gate that is not changing costs almost nothing. Power is drawn only at the moment of switching, when the output's capacitance is charged or discharged. You have already met that moment: it is the RC transient of Circuit Analysis (34/34), in which charging a capacitor from a supply costs ½CV² in the capacitor and the same amount in heat.
The square on the voltage is the most important term in computing. Halve the supply and the power drops to a quarter. For decades each generation of smaller transistors let engineers lower the voltage and raise the clock together (this is Dennard scaling, described by Robert Dennard and colleagues in 1974). In the mid-2000s the voltage could not be lowered further without the transistors leaking current while off, and clocks stopped climbing. That is the power wall, and it is why modern chips add more cores instead of racing a single one, and why they switch off whatever they are not using.
The scale is staggering. NVIDIA's H100 data-centre GPU, announced in 2022, has 80 billion transistors; each one is a switch like the one above. Chips this size are designed with software that solves node equations like those of the last piece, over and over, long before anything is built. The next step up, from transistors to gates, flip-flops and instructions, is exactly where Digital Logic Design (34/36) and Computer Architecture (34/25) begin. For the history of the processor itself, read Processors (29/11) first.
Illustrative round numbers, not a real chip: 1 billion gates of 0.3 fF each. The speed limit uses the common alpha-power model, with the clock anchored at 3 GHz for 1 V and a threshold of 0.3 V. The shape matters here, not the watts.
Electronics is three ideas repeated. A p–n junction passes current one way, with a current that grows exponentially with voltage. A transistor is a voltage-controlled valve: used as a switch it is the atom of every digital chip, used biased on its straight section it is an amplifier whose gain is gm times a resistor. Feedback around an op-amp trades most of its huge gain for precision set by two resistors, and costs bandwidth. Noise sets the floor, and in a chip, power grows as α × C × V² × f, which is the reason clocks stopped climbing.
Try this: take any phone charger or LED bulb that has a visible printed circuit board and find four things: the bridge of four diodes (or a single module), the biggest capacitor (the smoothing bucket), the transistor on a heat sink, and a small resistor next to an LED. If you can identify the job each one does, you can read the page.
Sources. Shockley diode equation, MOSFET square law, BJT transconductance, op-amp golden rules (Horowitz and Hill, The Art of Electronics), and the CMOS dynamic-power formula are standard textbook material (Sedra and Smith; Horowitz and Hill). The first transistor (Bell Labs, December 1947) and the 1956 Nobel Prize in Physics to Shockley, Bardeen and Brattain: Computer History Museum and Wikipedia's "Transistor" article (reported dates within December 1947 vary by source, so no day is given). Johnson (1928) and Nyquist (1928) thermal noise: standard attribution. The 2014 Nobel Prize in Physics for blue LEDs (Akasaki, Amano, Nakamura): Nobel Foundation. Dennard scaling: R. H. Dennard et al., IEEE Journal of Solid-State Circuits (1974); end of voltage scaling around the mid-2000s is the usual textbook account. NVIDIA H100: 80 billion transistors, announced 2022 (TechPowerUp and press coverage of the launch; pre-launch rumours of 140 billion were wrong). Computed in node: every reading in the interactives, including 38.7 mS and a gain of −182 at 1 mA and 4.7 kΩ, 1.82 µV of noise for 10 kΩ over 20 kHz at 300 K, the 1 V ripple of the 1 mF example, and the inverter's three regions.